   CASE OTHERWISE
             IF INV.AMT <= 0 THEN
                DOC.ID   = 'Acknowledgement'
                *** Check if user has the control record set to enable
                *** printing all gens on the acknowledgement
                READ ALL.FRST.PRT FROM CTRLFILE,'FRST.PRT.ALL.GENS' ELSE ALL.FRST.PRT = ''
                *** If control record is set to 'Y' then set the
                *** FRST.PRT.FL to yes.  If flag is set, then all gens
                *** will be displayed on the first print.
                IF ALL.FRST.PRT THEN FRST.PRT.FL = YES ELSE FRST.PRT.FL = NO
                *** Check if this is the First Print, if this is the first
                *** print in the acknowledgement, display all gens.
                *** If not the first print, display the gen specific one.
                IF FRST.PRT.FL THEN
                   READV PRT.HIST FROM LEDLFILE,OID,1 ELSE PRT.HIST = ''
                   PRT.HIST = RAISE(PRT.HIST)
                   LOCATE 'S' IN PRT.HIST SETTING ACK.POS ELSE ACK.POS = ''
                   IF ACK.POS THEN FRST.PRT.FL = NO
                END

                IF FRST.PRT.FL = YES THEN
                   ALL.GENS = YES
                   PRINT.LDIDS = ''
                END ELSE
                   ALL.GENS = ''
                END
             END ELSE
                DOC.ID   = 'Return Goods Acknowledgement'
             END
             ORD.ID   = OID
             DOC.TYPE = 'S'
          END CASE
